app.controller('appAnalysisCtrl', ['$rootScope', '$scope', 'httpLoad', '$modal', '$stateParams', '$state','meterService',function ($rootScope, $scope, httpLoad, $modal, $stateParams, $state,meterService) {
    $scope.isResourse=false;
    $scope.isQuality=false;
    $scope.isSafe=false;
    $scope.showResourse = function () {
        $scope.isResourse=true;
        $scope.isQuality=false;
        $scope.isSafe=false;
        httpLoad.loadData({
            url: '/img/list',
            data: $scope.param,
            noParam: true,
            success: function (data) {
                if (data.success) {
                    meterService.eChartBar("depart1");
                }
            }
        });
    };
    $scope.showQuality = function () {
        $scope.isResourse=false;
        $scope.isQuality=true;
        $scope.isSafe=false;
        httpLoad.loadData({
            url: '/img/list',
            data: $scope.param,
            noParam: true,
            success: function (data) {
                if (data.success) {
                    meterService.eChartsCircle("depart3");
                    meterService.eChartsCircle("depart4");
                }
            }
        });
    };
    $scope.showSafe = function () {
        $scope.isResourse=false;
        $scope.isQuality=false;
        $scope.isSafe=true;
    };
    //跳转详情页
    $scope.detail = function(item){
        $state.go('app.containerManger.shopDetail',{id:item.id,name:item.name});
    };
}])